#!/bin/bash

export ANDROID_NDK_HOME=/home/laptop/Downloads/android-ndk-r26d-linux/android-ndk-r26d

rm -rf build_android/pa/bin/*

mkdir -p build_android
cd build_android

cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
    -DANDROID_ABI="arm64-v8a" \
    -DANDROID_NATIVE_API_LEVEL=android-26 \
    -DANDROID_PLATFORM=android-26 \
    -DCMAKE_INSTALL_PREFIX=./pa \
    -DCMAKE_BUILD_TYPE=Release ..
make -j2
make install